package day1214;

import java.util.Scanner;

public class T12 {
    public static void main(String[] args) {
        /*Scanner s=new Scanner(System.in);

        System.out.println("请输入");
        int n=s.nextInt();
        boolean rs=true;

        for(int i=2; i<=n-1;  i++){
            if(n%i == 0){
                rs=false;
                System.out.println("不是质数");
            }
        }

        if(rs==true){
            System.out.println("是质数");
        }*/


        System.out.println("2是质数");
        for (int n = 3; n <1000 ; n++) {
            boolean rs=true;
            for(int i=2; i<=n-1;  i++){
                if(n%i == 0){
                    rs=false;
                }
            }
            if(rs==true){
                System.out.println(n + "是质数");
            }
        }






    }
}
